import pygame;
from pygame.sprite import Sprite;

from fjwar_tools import *;


class GameSprite(Sprite):
    """
        飞机大战游戏精灵

    """
    def __init__(self, image_name,speed=1):
        #如果父类不是object 一定要调用父类的初始化方法
        super().__init__();
        self.image = pygame.image.load(image_name);
        self.rect = self.image.get_rect();
        self.speed = speed;

    def update(self):
        #在垂直方向上移动
        self.rect.y = self.rect.y + self.speed;




